home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Herois / Codigo.Cst / 00198_Script_MM Jurassic Frame 2 < prev    next >
Text File  |  1999-03-19  |  2KB  |  71 lines

  1. on exitFrame
  2.   go the frame
  3. end
  4.  
  5. on idle
  6.   global gMustUpdate, mudouCursor, tipoCursor
  7.   set gMustUpdate = false
  8.   sendAllSprites(#idleSprite)
  9.   
  10.   set y = the mouseV
  11.   set v = 0
  12.   if y >= 297 and y < 347 then
  13.     set v = (y - 297) * (96 - 16) / 50 + 16
  14.   else if y > 112 and y <= 162 then
  15.     set v = (162 - y) * (96 - 16) / 50 + 16
  16.     set v = -v
  17.   end if
  18.   global gJurFora
  19.   if v <> 0 then
  20.     global gJurUltimo
  21.     if gJurFora then
  22.       set gJurFora = false
  23.       set gJurUltimo = the timer
  24.       return
  25.     end if
  26.     global gJurassicScroll, gJurMax
  27.     set d = v * (the timer - gJurUltimo) / 60
  28.     if gJurassicScroll + d < 224 then set d = 224 - gJurassicScroll
  29.     else if gJurassicScroll + d > gJurMax then 
  30.       set d = gJurMax - gJurassicScroll
  31.     end if
  32.     if d = 0 then 
  33.       if mudouCursor then
  34.         cursor -1
  35.         set mudouCursor = false
  36.         set gMustUpdate = true
  37.       end if
  38.       return
  39.     end if
  40.     set gJurUltimo = the timer
  41.     set tmp = gJurassicScroll
  42.     jurassicScroll gJurassicScroll + d
  43.     if tmp <> gJurassicScroll then
  44.       if d > 0 then
  45.         cursor [the number of member ("CursorBaixo" & tipoCursor),¼
  46.             the number of member "CursorMask"]
  47.       else
  48.         cursor [the number of member ("CursorCima" & tipoCursor),¼
  49.             the number of member "CursorMask"]
  50.       end if
  51.       set tipoCursor = 3 - tipoCursor
  52.       set mudouCursor = true
  53.       set gMustUpdate = true
  54.     else
  55.       if mudouCursor then
  56.         cursor -1
  57.         set mudouCursor = false
  58.         set gMustUpdate = true
  59.       end if
  60.     end if
  61.   else
  62.     set gJurFora = true
  63.     if mudouCursor then
  64.       cursor -1
  65.       set mudouCursor = false
  66.       set gMustUpdate = true
  67.     end if
  68.   end if
  69.   
  70.   if gMustUpdate then updateStage
  71. end